package designpattern.factory.simple;

/**
 * @author cyt
 * @create 2020-04-21 15:43
 */
public class factory {

    public static car getCar(String name) {

        if (name.equals("五菱")) {
            return new Wuli();
        } else if (name.equals("大众")) {
            return new Dazong();
        } else {
            return null;
        }
    }
}
